package com.example.booksales.service.impl;

import com.example.booksales.domain.Shop;
import com.example.booksales.mapper.ShopMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopServicelmpl implements ShopService {
    @Autowired
    ShopMapper shopMapper;
    @Override
    public List<Shop> getAllShops() {
        return shopMapper.getAllShops();
    }
    public Shop selectShopById(Long shopid) {
        return shopMapper.selectShopById(shopid);
    }
    @Override
    public int insertShop(Shop shop){
        return shopMapper.insertShop(shop);
    }
    @Override
    public int updateShop(Shop shop){
        return shopMapper.updateShop(shop);
    }
    @Override
    public int deleteShopById(Long shopid){
        return shopMapper.deleteShopById(shopid);
    }
}
